// web/src/actions/admin.ts
'use server';

import {currentRole} from "@/lib/auth";
import {UserRole} from "@/lib/types";

export const admin = async () => {
    const role = await currentRole()

    if (role !== UserRole.ADMIN) {
        return {error: "Forbidden!"}
    }

    return {success: "Allowed!"}
}